package com.blacksheep.mtm.dao;

import com.blacksheep.mtm.dto.report.IceNowStatusReocord;
import com.blacksheep.mtm.pojo.manager.TbDevice;
import com.blacksheep.mtm.pojo.manager.TbDeviceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TbDeviceMapper {
    long countByExample(TbDeviceExample example);

    int deleteByExample(TbDeviceExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TbDevice record);

    int insertSelective(TbDevice record);

    List<TbDevice> selectByExample(TbDeviceExample example);

    TbDevice selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TbDevice record, @Param("example") TbDeviceExample example);

    int updateByExample(@Param("record") TbDevice record, @Param("example") TbDeviceExample example);

    int updateByPrimaryKeySelective(TbDevice record);

    int updateByPrimaryKey(TbDevice record);


    List<TbDevice> selectList(@Param("search") String search, @Param("state") int[] state, @Param("type") String[] type, @Param("minDate") String minDate,
                                @Param("maxDate") String maxDate, @Param("orderCol") String orderCol,
                                @Param("orderDir") String orderDir);

    int updateStateByPrimaryKey(@Param("id")Integer id,@Param("state")Integer state);

    List<TbDevice> selecWStList(@Param("search") String search, @Param("state") int[] state, @Param("minDate") String minDate,
                              @Param("maxDate") String maxDate, @Param("orderCol") String orderCol,
                              @Param("orderDir") String orderDir);
    int getCountByType(String type);

    TbDevice selectByCode(String code);
    String selectLastCode(String type);

    List<String> selectIceBoxCodeList(String code);

    List<TbDevice> selectAllList();

    List<IceNowStatusReocord> selectIceNowStatusReocords(@Param("search") String search, @Param("orderCol") String orderCol,
                                                         @Param("orderDir") String orderDir);
}